package com.jinlejia.erp.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.jinlejia.erp.base.BeanKey;

/**
 * @author 王进 on 2019/1/16.
 */

public class EstateBean implements BeanKey,Parcelable {
    private String estateName;  //小区名称
    private String area;        //片区
    private String county;      //区县
    private String reCode;      //小区编码

    public EstateBean(){

    }
    protected EstateBean(Parcel in) {
        estateName = in.readString();
        area = in.readString();
        county = in.readString();
        reCode = in.readString();
    }

    public static final Creator<EstateBean> CREATOR = new Creator<EstateBean>() {
        @Override
        public EstateBean createFromParcel(Parcel in) {
            return new EstateBean(in);
        }

        @Override
        public EstateBean[] newArray(int size) {
            return new EstateBean[size];
        }
    };

    public String getEstateName() {
        return estateName;
    }

    public void setEstateName(String estateName) {
        this.estateName = estateName;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public String getReCode() {
        return reCode;
    }

    public void setReCode(String reCode) {
        this.reCode = reCode;
    }

    @Override
    public String toString() {
        return estateName;
    }

    @Override
    public String key() {
        return reCode;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(estateName);
        dest.writeString(area);
        dest.writeString(county);
        dest.writeString(reCode);
    }
}
